import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
import NavType from '@comp/NavType'
import Swiper from '@comp/Swiper'
import store from '@/store'
import '@/mock/mockServer'

Vue.config.productionTip = false

//全局注册NavType
Vue.component('NavType', NavType)
Vue.component('Swiper', Swiper)

new Vue({
  render: h => h(App),
  router,
  store,
  //事件总线的绑定必须在mounted之前(组件的挂载顺序父bc,父c,子bc,子c,子m,父m,如果写在mounted中,子组件拿不到数据)
  beforeCreate() {
    Vue.prototype.$bus = this
  }
}).$mount('#app')

